/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package testgui3;

import java.util.*;

/**
 *
 * @author Administrator
 */
public class Table {

    private String name;
    private Chair[] chairArray = new Chair[4];
    private boolean isEnabled = false;
    private int numberOfTables = 0;
    private double moneySpent = 0;
    private boolean hasTimerTask = false;
    private MoneyTask moneytask;
    
    
    public void createAndAddMoneyTask(MoneyTimer mt)
    {   
        createMoneyTask();
        mt.addTimerTask(moneytask);
    }
    
    private void createMoneyTask()
    {
        moneytask = new MoneyTask(this);
    }
    
    public MoneyTask getMoneyTask()
    {
        return moneytask;
    }
    public void increaseMoney()
    {
        moneySpent += 1;
    }
    
    public void setHasTimer(boolean b)
    {
        hasTimerTask = b;
    }
    
    public boolean hasTimer()
    {
            return hasTimerTask;
    }
}
